<!DOCTYPE html>
<html>
<script src="../../resources/js-test.js"></script>
<div id="test"> </div>
<script>
description("Tests a flag to make background shorthand property not override background-size when it's already set.");

var e = document.getElementById('test');

if (window.internals) {
    internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true);

    e.style.backgroundSize = "cover";
    e.style.background = "center red url(dummy://test.png) no-repeat border-box";
    shouldBeEqualToString("e.style.background", 'url("dummy://test.png") center center / cover no-repeat border-box border-box red')
    shouldBeEqualToString("e.style.backgroundSize", 'cover');
    debug("")

    internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false);
}

</script>
</body>
</html>
